﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Model.CommonObject;
using ZBJF.Warranty.BLL.Cached;
using ZBJF.Warranty.Common.Common;

namespace ZBJF.Warranty.FengQiao
{
    public class WeiXinConfig
    {
        static AppConfigEntity entity = new AppConfigEntity();
        static WeiXinConfig()
        {
            entity = AppConfigCached.GetAppConfig();
        }
        //=======【基本信息设置】==============================================================================
        /// <summary>
        ///顾客编码的clientCode（必须配置）
        /// </summary>
        public static string ClientCode
        {
            get
            {
                string clientCode = entity.FengQiao_clientCode;
                if (string.IsNullOrEmpty(clientCode))
                {
                    LogHelper.WriteLog("丰桥平台的clientCode未配置", LogType.tag);
                }
                return clientCode;
            }
        }
        /// <summary>
        ///校验码（必须配置） 
        /// </summary>
        public static string CheckWord
        {
            get
            {
                string checkWord = entity.FengQiao_checkWord;
                if (string.IsNullOrEmpty(checkWord))
                {
                    LogHelper.WriteLog("丰桥平台校验码未配置", LogType.tag);
                }
                return checkWord;
            }
        }
        /// <summary>
        ///丰桥服务地址（必须配置）
        /// </summary>
        public static string ReqURL
        {
            get
            {
                string reqURL = "http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService";
                if (string.IsNullOrEmpty(reqURL))
                {
                    LogHelper.WriteLog("丰桥服务地址未配置", LogType.tag);
                }
                return reqURL;
            }
        }
    }
}
